package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsGoodsMapper;
import com.qf.pojo.DtsGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * SPU
 * @author fy
 * @version V1.0
 * @Project workspace
 * @Package com.qf.service
 * @Description:
 * @Date 2022/6/21 2:26
 */
@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private DtsGoodsMapper goodsMapper;
    @Override
    public int countGoods() {
        QueryWrapper<DtsGoods> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deleted", false);
        Integer count = goodsMapper.selectCount(queryWrapper);
        return count;
    }
}
